home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 May / Chip Mayıs 2001.iso / prog / share / 30 / setup.exe / data1.cab / Fsi_-_English / SiteWizard / vert2.js < prev    next >
Encoding:
Text File  |  2001-03-15  |  6.2 KB  |  78 lines

  1. // Global Variables
  2. BType = 0;
  3. XChoice = 0;
  4. Ximg = "";
  5.  
  6. arrowon = new Image;
  7. arrowon.src = "images/on.gif";
  8. arrowoff = new Image;
  9. arrowoff.src = "images/off.gif";
  10.  
  11. //Site Type Selection
  12. function img_act(num) {
  13.         imgName = "arrow" + num;
  14.         imgOn = eval("arrowon.src");
  15.         document [imgName].src = imgOn;
  16. }
  17. function img_inact(num) {
  18.         imgName = "arrow" + num;
  19.         imgOff = eval("arrowoff.src");
  20.         document [imgName].src = imgOff;
  21. }
  22. function setBusiness(num) {
  23. BType = num;
  24. }
  25. function setRight(num) {
  26. window.location = "vert2.html?x='+num+'";
  27. }
  28. function menuBar(choicename,choicenumber) {
  29. arrownumber = "arrow" + choicenumber;
  30. if (document.all) {document.write('<TABLE background="images/bg_trans.gif" cellpadding=0 cellspacing=0 border=0><TR><td width=10><img src="images/bg_trans.gif" height=1 width=10></td><TD><img src="images/off.gif" name="'+arrownumber+'" width=10 height=10></TD><TD ONCLICK="if (BType != '+choicenumber+' && BType != 0) {img_inact(BType)}; setBusiness('+choicenumber+'); img_act('+choicenumber+')" onmouseover="if (BType == 0) {img_act('+choicenumber+')}" onmouseout="if (BType != '+choicenumber+'){img_inact('+choicenumber+')}"><span class=businesstypename><a href="javascript:rightHand2(1);">'+choicename+'</A><BR></TD></TR></TABLE>')}
  31. else if (document.layers){document.write('<TABLE background="images/bg_trans.gif" cellpadding=0 cellspacing=0 border=0><TR><td width=10><img src="images/bg_trans.gif" height=1 width=10></td><TD><img src="images/off.gif" name="'+arrownumber+'"width=10 height=10></TD><TD><span class=businesstypename><a href="javascript:if (BType != '+choicenumber+' && BType != 0) {img_inact(BType)}; setBusiness('+choicenumber+'); img_act('+choicenumber+'); setRight('+choicenumber+')" onmouseover="if (BType == 0) {img_act('+choicenumber+')}" onmouseout="if (BType != '+choicenumber+'){img_inact('+choicenumber+')}">'+choicename+'</A></A><BR></TD></TR></TABLE>')}
  32. }
  33. //Style Selections
  34. function styleBlock(imagesrc,imagename,num) {
  35. if (document.all) {document.write('<table background="" cellpadding=8><tr><td><img src="images/bg_trans.gif" width=25></td><td><DIV ALIGN="CENTER" ID="type'+num+'" STYLE="Z-Index:5;cursor:hand"><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0"><TR><TD BORDERCOLOR="white" ONCLICK="if (XChoice != 0 && XChoice != '+num+') {unmarkSelection(Ximg,XChoice)}; setChoice('+num+',\''+imagesrc+'\'); className=\'menuStyleSelected\'" onmouseover="if (XChoice != '+num+') {className=\'menuStyle\'}" onMouseout="if (XChoice != '+num+') {className=\'menu\'}"><img src="images/'+imagesrc+'" width=100 height=75 hspace=3 vspace=3></TD></TR></TABLE></DIV></td><td width=150><font class=stylename>'+imagename+'</FONT></td></tr></table>')}
  36.  
  37. else if (document.layers){document.write('<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="2"><TR><TD><table background="" cellpadding=8><tr><td><img src="images/bg_trans.gif" width=25></td><td><ILAYER id="otype'+num+'"><LAYER id="type'+num+'" onmouseover="if (XChoice != '+num+') {bgColor=\'cccccc\'}" onmouseout="if (XChoice != '+num+') {bgColor=\'white\'}"><A HREF="javascript:if (XChoice != 0 && XChoice != '+num+') {unmarkSelection(Ximg,XChoice)}; setChoice('+num+',\''+imagesrc+'\')" class=menulinks><img src="images/'+imagesrc+'" width=100 height=75 hspace=3 vspace=3 border=0></A></CENTER></LAYER></ILAYER></td><td width=150><font class=stylename>'+imagename+'</FONT></td></tr></table></TD></TR></TABLE>')}
  38. }
  39. //Set New Choice Unselect Previous Choice
  40. function setChoice(num,imagesrc) {
  41. XChoice = num;
  42. Ximg = imagesrc;
  43. }
  44. function unmarkSelection(imagesrc,num) {
  45. var oldselection = "type" + num;
  46. var oldselection2 = "otype" + num;
  47. if (document.all) {document.all[oldselection].innerHTML = ('<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0"><TR><TD BORDERCOLOR="white" ONCLICK="if (XChoice != 0 && XChoice != '+num+') {unmarkSelection(Ximg,XChoice)}; setChoice('+num+',\''+imagesrc+'\'); className=\'menuStyleSelected\'" onmouseover="if (XChoice != '+num+') {className=\'menuStyle\'}" onMouseout="if (XChoice != '+num+') {className=\'menu\'}"><img src="images/'+imagesrc+'" width=100 height=75 hspace=3 vspace=3></TD></TR></TABLE>')}
  48. else if (document.layers){
  49. document.choices.choicesi.layers[oldselection2].layers[oldselection].document.open();
  50. document.choices.choicesi.layers[oldselection2].layers[oldselection].document.write('<LAYER bgColor=ffffff id="type'+num+'" onmouseover="if (XChoice != '+num+') {bgColor=\'cccccc\'}" onmouseout="if (XChoice != '+num+') {bgColor=\'white\'}"><A HREF="javascript:if (XChoice != 0 && XChoice != '+num+') {unmarkSelection(Ximg,XChoice)};  setChoice('+num+',\''+imagesrc+'\')" class=menulinks><img src="images/'+imagesrc+'" width=100 height=75 hspace=3 vspace=3 border=0></A></CENTER></LAYER>');
  51. document.choices.choicesi.layers[oldselection2].layers[oldselection].document.close();
  52.      }
  53. }
  54.  
  55. function rightHand(start) {
  56. var boxwidth=300
  57. if (document.all) {document.write('<DIV ALIGN="CENTER" ID="choices" STYLE="Z-Index:5">');
  58. styleBlock('thumb_aero.gif', 'Aero', '1');
  59. styleBlock('thumb_halftone.gif', 'Halftone', '2');
  60. styleBlock('thumb_skyward.gif', 'Skyward', '3');
  61. document.write('</DIV>')}
  62. else if (document.layers){document.write('<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="1"><TR><TD><TABLE BORDER="0" CELLPADDING="8" CELLSPACING="0" width="'+boxwidth+'"><TR><TD><ILAYER id="choices"><LAYER width="'+boxwidth+'" id="choicesi">');
  63. styleBlock('thumb_aero.gif', 'Aero', '1');
  64. styleBlock('thumb_halftone.gif', 'Halftone', '2');
  65. styleBlock('thumb_skyward.gif', 'Skyward', '3');
  66. document.write('</LAYER></ILAYER></TD></TR></TABLE></TD></TR></TABLE>')}
  67. }
  68. function rightHand2(start) {
  69. var boxwidth=300
  70.  
  71. if (document.all) {
  72. document.all.choices.innerHTML = ('<script language="javascript">styleBlock(\'thumb_aero.gif\', \'Aero\', \'1\')</script>')}
  73. else if (document.layers){
  74. document.layers['odescription'].layers['description'].document.open();
  75. document.layers['odescription'].layers['description'].document.write('<TABLE WIDTH='+boxwidth+' cellpadding=0 cellspacing=0 border=0><FONT class=infotitle>'+title+'</FONT><BR><FONT class=infodescription>'+descrip+'</FONT></TD></TR></TABLE>');
  76. document.layers['odescription'].layers['description'].document.close();
  77.      }
  78. }